package com.chinatelecom.controller.system;


import com.chinatelecom.common.annotation.Log;
import com.chinatelecom.common.controller.BaseController;
import com.chinatelecom.common.domain.QueryRequest;
import com.chinatelecom.entity.system.SysArea;
import com.chinatelecom.service.system.ISysAreaService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author nobody
 */
@Slf4j
@RestController
@RequestMapping("/system/area")
public class SysAreaController extends BaseController {
    @Autowired
    private ISysAreaService areaService;

    @Log("查询所有地区")
    @GetMapping()
    @ApiOperation(value = "查询地区数据", notes = "查询数据参数,支持条件查询传入参数name", httpMethod = "GET")
    public Map<String, Object> areaList(QueryRequest queryRequest, SysArea area) {
        return getDataTable(areaService.getList(area, queryRequest));
    }


}
